/*
 * config.h
 *
 *  Created on: May 22, 2021
 *      Author: kirk_
 */

#ifndef CONFIG_H_
#define CONFIG_H_

#include "main.h"
#include "cmsis_os.h"

#include "string.h"
#include "stdio.h"
/*
#include "kdl_tb6612.h"
#include "kdl_encoder.h"
#include "kdl_led.h"
#include "kdl_mpu6050.h"

#include "kd_floatpid.h"

#include "hcsr04.h"
*/
#define PRINTF(fmt, ...)    printf("%s,%d:\t" fmt, __FUNCTION__, __LINE__, ## __VA_ARGS__)
#define Debug 1U

#if Debug
#define CheckHere PRINTF("Here!\r\n")
#else
#define CheckHere (void)0
#endif
/*
extern osThreadId_t defaultTaskHandle;
extern osTimerId_t AdjustTimerHandle;
extern osThreadId_t AdjustThreadHandle;
extern osThreadId_t DirectionThreadHandle;
extern osTimerId_t DirectionTimerHandle;

extern I2C_HandleTypeDef hi2c1;

extern TIM_HandleTypeDef htim1;
extern TIM_HandleTypeDef htim2;
extern TIM_HandleTypeDef htim3;
extern TIM_HandleTypeDef htim5;
extern TIM_HandleTypeDef htim8;
extern TIM_HandleTypeDef htim15;

extern UART_HandleTypeDef huart1;

#define MPU6050_Addr 0xD0
#define Default_Fetch_Period 100U
#define Default_Direction_Period 50U
#define Max_Velocity 500000
#define Movement_Normalize 160

extern KDL_TB6612_t Motor[4];
extern KDL_Encoder_t Encoder[4];
extern KDL_MPU6050_t MPU6050;
extern HCSR04_t HCSR04;

extern KD_FloatPID_t Velocity[4];
extern KD_FloatPID_t PositionX;
extern KD_FloatPID_t PositionY;
extern KD_FloatPID_t Direction;
*/
extern UART_HandleTypeDef huart4;
extern osThreadId_t UsmartThreadHandle;

#endif /* CONFIG_H_ */
